package com.oet.persistence.entity;

// Generated Feb 6, 2010 3:22:38 PM by Hibernate Tools 3.2.4.GA

import static javax.persistence.GenerationType.IDENTITY;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * YdkRole generated by hbm2java
 */
@Entity
@Table(name = "mngr_role", catalog = "oet")
public class MngrRole implements java.io.Serializable {

	private Long id;
	private String roleName;
	private int mask;
//	private List<YdkAccount> ydkAccounts = new ArrayList<YdkAccount>(0);

	public MngrRole() {
	}
	
	public MngrRole(Long id) {
		this.id = id;
	}

	public MngrRole(String roleName, int mask) {

		this.roleName = roleName;
		this.mask = mask;
	}

//	public YdkRole(String roleName, int mask, List<YdkAccount> ydkAccounts) {
//		this.roleName = roleName;
//		this.mask = mask;
//		this.ydkAccounts = ydkAccounts;
//	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "role_name", nullable = false, length = 50)
	public String getRoleName() {
		return this.roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	@Column(name = "mask", nullable = false)
	public int getMask() {
		return this.mask;
	}

	public void setMask(int mask) {
		this.mask = mask;
	}

//	@OneToMany(fetch = FetchType.LAZY, mappedBy = "ydkRole", cascade= {CascadeType.REMOVE})
//	public List<YdkAccount> getYdkAccounts() {
//		return this.ydkAccounts;
//	}
//
//	public void setYdkAccounts(List<YdkAccount> ydkAccounts) {
//		this.ydkAccounts = ydkAccounts;
//	}

}
